Skip to content

Comments

Improved auto-invert#304

Merged
gr5 merged 2 commits intomasterfrom
issue167
Dec 23, 2025
Merged

Improved auto-invert#304
gr5 merged 2 commits intomasterfrom
issue167

Conversation

@gr5
Copy link
Collaborator

@gr5 gr5 commented Dec 22, 2025

I'm probably not done with autoinvert but this should improve it a lot!

I added 2 member variables to class wavefront:

WavefrontOrigin m_origin;
bool m_manuallyInverted; 

The second one keeps track if a user inverted this wavefront. The first keeps track of where this wavefront came from:
enum WavefrontOrigin {wfUnknown, wfIgram, wfFile, wfSimulation, wfAverage, wfSubtraction, wfDemo, wfZernikes, wfSmoothed};

If the wavefront didn't come from an igram or if it was manually inverted then the auto-invert procedure is bypassed. The wavefront origin flag may be useful for other things some day. Not sure.

I tested this very thoroughly. For example when you do "test stand astig removal tool" the various created wavefronts have the flag for file, average, etc. Rotated wavefronts copy the origin of the wavefront before rotation.

Now keep track of origin of wavefront (e.g. did it come from file? igram?)
Also keep track if wavefront was manually inverted by user
@github-actions
Copy link

🚀 New build available for commit 5e58d76
Download installer here

Copy link
Collaborator

@atsju atsju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand the intent correctly, I think it's a good first step.

There will still be the popup when loading igrams.

@gr5
Copy link
Collaborator Author

gr5 commented Dec 22, 2025

If I understand the intent correctly, I think it's a good first step.

There will still be the popup when loading igrams.

exactly.

increase readability slightly and eliminate potential global label conflicts.
@gr5
Copy link
Collaborator Author

gr5 commented Dec 22, 2025

I did your suggestion @atsju.

@github-actions
Copy link

🚀 New build available for commit 73b445d
Download installer here

@gr5 gr5 merged commit 812e61c into master Dec 23, 2025
14 checks passed
@atsju atsju deleted the issue167 branch December 23, 2025 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants